package com.blyat.xsoft.kernel.component.mq;

import java.util.Collection;

/**
 * @Auther: syh
 * @Date: 2020/8/10
 * @Description:
 */
public interface MQProducer {

    int send(String topic, Object content);

    default int send(String topic, Collection<Object> messages) {
        return 0;
    }

    default void sendAsync(String topic,
                           Object content,
                           MQListener asyncListener) {

    }

    default void sendAsync(
            String topic,
            Object content,
            int timeout,
            MQListener asyncListener) {
    }

    default void sendOneWay(String topic, Object content) {

    }

    default int sendOrderly(String topic, Object content) {
        return 0;
    }

    default int sendInTransaction(String topic, Object content) {
        return 0;
    }
}
